import Vue from "vue";
import Router from "vue-router";

Vue.use(Router);

/* layoutTeacher */
import layoutTeacher from "@/layout/teacher";
export const teacher_constantRoutes = [
  {
    path: "/redirect",
    component: layoutTeacher,
    hidden: true,
    children: [
      {
        path: "/redirect/:path(.*)",
        component: () => import("@/views/redirect"),
      },
    ],
  },
  {
    path: "/login",
    component: () => import("@/views/login"),
    hidden: true,
  },
  {
    path: "*",
    redirect: "/index",
  },
  {
    path: "/401",
    component: () => import("@/views/error/401"),
    hidden: true,
  },
  {
    path: "",
    component: layoutTeacher,
    redirect: "index",
    children: [
      {
        path: "index",
        component: () => import("@/views/teachStudentIndex"),
        name: "Index",
        meta: {
          tab: "/teachIndex",
          title: "首页",
          icon: "dashboard",
          affix: true,
        },
      },
      {
        path: "/studentGrade",
        component: () => import("@/views/tea_studentGrade/studentGrade"),
        name: "Index",
        meta: {
          tab: "/teachIndex",
          title: "首页",
          icon: "dashboard",
          affix: true,
        },
      },
      {
        path: "/learningProgress",
        component: () => import("@/views/home/learningProgress"),
        name: "learningProgress",
        meta: { tab: "/teachIndex", title: "学习进度" },
      },
      {
        path: "/groupSetup",
        component: () => import("@/views/groupSetup/groupSetup.vue"),
        name: "groupSetup",
        meta: { tab: "/teachIndex", title: "小组设置" },
      },
      {
        path: "/teachIndex",
        component: () => import("@/views/teachIndex/teachIndex.vue"),
        name: "teachIndex",
        meta: { tab: "/teachIndex", title: "教学主页" },
      },
      {
        path: "/message",
        component: () => import("@/views/home/message"),
        name: "message",
        meta: { title: "消息列表" },
      },
      {
        path: "/notice",
        component: () => import("@/views/announcement/announcementManagement/notice"),
        name: "notice",
        meta: { title: "公告" },
      },
      {
        path: "/question",
        component: () => import("@/views/question"),
        // hidden: true,
        meta: { title: "问卷调查" },
      },
    ],
  },
  {
    path: "/dataAtAGlance",
    component: layoutTeacher,
    hidden: true,
    redirect: "noredirect",
    children: [
      {
        path: "",
        component: () => import("@/views/dataAtAGlance.vue"),
        name: "dataAtAGlanceIndex",
        meta: { tab: "/dataAtAGlance", title: "数据概览", icon: "" },
      },
    ],
  },
  {
    path: "/teaDisciplineGroup",
    component: layoutTeacher,
    hidden: true,
    redirect: "noredirect",
    children: [
      {
        path: "waitReviewCourseList",
        component: () => import("@/views/teaDisciplineGroup/waitReviewCourseList.vue"),
        name: "teaDisciplineGroup",
        meta: { tab: "/moreControl", title: "课程审核", icon: "" },
      },
      {
        path: "disciplineGroup",
        component: () => import("@/views/teaDisciplineGroup/disciplineGroup.vue"),
        name: "disciplineGroup",
        meta: { tab: "/moreControl", title: "学科专业组", icon: "" },
      },
    ],
  },
  {
    path: "/workstation",
    component: layoutTeacher,
    hidden: true,
    redirect: "noredirect",
    children: [
      {
        path: "",
        component: () => import("@/views/workstation/index.vue"),
        name: "workstationIndex",
        meta: { tab: "/workstation", title: "工作站", icon: "" },
      },
      {
        path: "detail",
        component: () => import("@/views/workstation/detail.vue"),
        name: "workstationDetail",
        meta: { tab: "/workstation", title: "工作站详情", icon: "" },
      },
    ],
  },
  {
    path: "/statistics",
    component: layoutTeacher,
    hidden: true,
    redirect: "noredirect",
    children: [
      {
        path: "",
        component: () => import("@/views/statistics/index.vue"),
        name: "statisticsIndex",
        meta: { tab: "/statistics", title: "学生统计首页", icon: "" },
      },
      {
        path: "gradeDetail",
        component: () => import("@/views/statistics/gradeDetail.vue"),
        name: "gradeDetail",
        meta: { tab: "/statistics", title: "学生统计详情", icon: "" },
      },
      {
        path: "gradeList",
        component: () => import("@/views/statistics/gradeList.vue"),
        name: "gradeList",
        meta: { tab: "/statistics", title: "学生统计列表", icon: "" },
      },
      {
        path: "TeachingQualityAnalysis",
        component: () =>
          import("@/views/statistics/TeachingQualityAnalysis.vue"),
        name: "TeachingQualityAnalysis",
        meta: { tab: "/statistics", title: "教学质量分析", icon: "" },
      },
    ],
  },
  {
    path: "/appraise",
    component: layoutTeacher,
    hidden: true,
    redirect: "noredirect",
    children: [
      {
        path: "",
        component: () => import("@/views/appraise/index.vue"),
        name: "appraise",
        meta: { title: "学生评价", icon: "" },
      },
    ],
  },
  {
    path: "/course",
    component: layoutTeacher,
    hidden: true,
    redirect: "noredirect",
    children: [
      {
        path: "",
        component: () => import("@/views/tea_course/index.vue"),
        name: "courseIndex",
        meta: { tab: "/course", title: "课程", icon: "" },
      },
      {
        path: "add",
        component: () => import("@/views/tea_course/addCourse.vue"),
        name: "courseAdd",
        meta: { tab: "/course", title: "添加课程", icon: "" },
      },
      {
        path: "topicImportCheck",
        component: () => import("@/views/tea_course/topicImportCheck.vue"),
        name: "topicImportCheck",
        meta: { tab: "/course", title: "导入试题", icon: "" },
      },
    ],
  },
  {
    path: "/allCourse",
    component: layoutTeacher,
    hidden: true,
    redirect: "noredirect",
    children: [
      {
        path: "",
        component: () =>
          import("@/views/schoolCourse/schoolCourse.vue"),
        name: "allCourse",
        meta: { tab: "/allCourse", title: "课程", icon: "" },
      },
      {
        path: "recommendCourseDetial",
        component: () => import("@/views/tea_course/addCourse.vue"),
        name: "courseDetial",
        meta: { tab: "/allCourse", title: "课程详情", icon: "" },
      },
    ],
  },
  {
    path: "/exam",
    component: layoutTeacher,
    hidden: true,
    redirect: "noredirect",
    children: [
      {
        path: "/approvalAnswer",
        component: () => import("@/views/tea_course/approvalAnswer.vue"),
        name: "approvalAnswer",
        meta: { tab: "/exam", title: "考核批改", icon: "" },
      },
      {
        path: "/examDetail",
        component: () => import("@/views/home/examDetail"),
        name: "examDetail",
        meta: { tab: "/course", title: "考核详情" },
      },
    ],
  },
  // /user/profile
  {
    path: "/user",
    component: layoutTeacher,
    hidden: true,
    redirect: "noredirect",
    children: [
      {
        path: "profile",
        component: () => import("@/views/system/tea_user/profile/index"),
        name: "Profile",
        meta: { title: "个人中心", icon: "user" },
      },
      {
        path: "reset",
        component: () => import("@/views/system/tea_user/profile/reset"),
        name: "reset",
        meta: { title: "修改密码", icon: "user" },
      },
      {
        path: "helpCenter",
        component: () =>
          import("@/views/system/tea_user/profile/helpCenter"),
        name: "helpCenter",
        meta: { title: "帮助中心", icon: "user" },
      },
    ],
  },
  {
    path: "/moreControl",
    component: layoutTeacher,
    hidden: true,
    redirect: "noredirect",
    children: [
      {
        path: "",
        component: () => import("@/views/moreControl/moreControls"),
        name: "moreControl",
        meta: { tab: "/moreControl", title: "更多", icon: "" },
      },
    ],
  },
  {
    path: "/testPaperFormation",
    component: layoutTeacher,
    hidden: true,
    redirect: "noredirect",
    children: [
      {
        path: "",
        component: () => import("@/views/ExaminationModule/testPaperFormation.vue"),
        name: "testPaperFormation",
      },
    ],
  },
  {
    path: "/topicBank",
    component: layoutTeacher,
    hidden: true,
    redirect: "noredirect",
    children: [
      {
        path: "",
        component: () => import("@/views/ExaminationModule/topicBank.vue"),
        name: "topicBank",
      },
    ],
  },
  {
    path: "/actionpreviewPaper",
    component: layoutTeacher,
    hidden: true,
    redirect: "noredirect",
    children: [
      {
        path: "",
        component: () => import("@/views/ExaminationModule/actionpreviewPaper.vue"),
        name: "actionpreviewPaper",
      },
    ],
  },
  {
    path: "/previewPaperDetail",
    component: layoutTeacher,
    hidden: true,
    redirect: "noredirect",
    children: [
      {
        path: "",
        component: () => import("@/views/ExaminationModule/previewPaperDetail.vue"),
        name: "previewPaperDetail",
      },
    ],
  },


];
